package com.learning.db.function2;

import org.apache.hadoop.io.Writable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;


/**
 * 订单表：
 *
 * @author hyc
 */
public class JBean implements Writable {
    /**
     1.人员编号|2.医疗结算事件id|3.自负金额|4.累计自负费用|5.本次自负赔付|6.累计自负赔付|7.取小后的本次合规自费费用
     |8.累计合规费用|9.累计自负费用+累计合规费用|10.本次自负加合规赔付|11.累计自负加合规赔付|结算日期|当前日期时间
     */
    private String PersonId;
    private String MedicalId;
    private String SOwnExpense;
    private String sum_OwnExpense;
    private String money;
    private String sum_POwnExpense;
    private String Compliance;
    private String sum_Compliance;
    private String sum_OwnExpense_add_sum_Compliance;
    private String money2;
    private String sum_POwnExpense_add_Compliance;
    private String SettlementDate;
    private String systemdate;

    // flag=1表示这个对象是封装产品信息记录
    private String flag;

    public void set(String PersonId, String MedicalId, String SOwnExpense, String sum_OwnExpense, String money,
                    String sum_POwnExpense, String Compliance, String sum_Compliance ,String sum_OwnExpense_add_sum_Compliance ,
                    String money2 , String sum_POwnExpense_add_Compliance, String SettlementDate,String systemdate, String flag) {
        this.PersonId = PersonId;
        this.MedicalId = MedicalId;
        this.SOwnExpense = SOwnExpense;
        this.sum_OwnExpense = sum_OwnExpense;
        this.money = money;
        this.sum_POwnExpense = sum_POwnExpense;
        this.Compliance = Compliance;
        this.sum_Compliance = sum_Compliance;
        this.sum_OwnExpense_add_sum_Compliance = sum_OwnExpense_add_sum_Compliance;
        this.money2 = money2;
        this.sum_POwnExpense_add_Compliance = sum_POwnExpense_add_Compliance;
        this.SettlementDate = SettlementDate;
        this.systemdate = systemdate;
        this.flag = flag;
    }

    public String getPersonId() {
        return PersonId;
    }

    public void setPersonId(String PersonId) {
        this.PersonId = PersonId;
    }

    public String getMedicalId() {
        return MedicalId;
    }

    public void setMedicalId(String MedicalId) {
        this.MedicalId = MedicalId;
    }

    public String getSOwnExpense() {
        return SOwnExpense;
    }

    public void setSOwnExpense(String SOwnExpense) {
        this.SOwnExpense = SOwnExpense;
    }

    public String getsum_OwnExpense() {
        return sum_OwnExpense;
    }

    public void setsum_OwnExpense(String sum_OwnExpense) {
        this.sum_OwnExpense = sum_OwnExpense;
    }

    public String getmoney() {
        return money;
    }

    public void setmoney(String money) {
        this.money = money;
    }

    public String getsum_POwnExpense() {
        return sum_POwnExpense;
    }

    public void setsum_POwnExpense(String sum_POwnExpense) {
        this.sum_POwnExpense = sum_POwnExpense;
    }

    public String getCompliance() {
        return Compliance;
    }

    public void setCompliance(String Compliance) {
        this.Compliance = Compliance;
    }

    public String getsum_Compliance() {
        return sum_Compliance;
    }

    public void setsum_Compliance(String sum_Compliance) {
        this.sum_Compliance = sum_Compliance;
    }

    public String getsum_OwnExpense_add_sum_Compliance() {
        return sum_OwnExpense_add_sum_Compliance;
    }

    public void setsum_OwnExpense_add_sum_Compliance(String sum_OwnExpense_add_sum_Compliance) {
        this.sum_OwnExpense_add_sum_Compliance = sum_OwnExpense_add_sum_Compliance;
    }

    public String getmoney2() {
        return money2;
    }

    public void setmoney2(String money2) {
        this.money2 = money2;
    }

    public String getsum_POwnExpense_add_Compliance() {
        return sum_POwnExpense_add_Compliance;
    }

    public void setsum_POwnExpense_add_Compliance(String sum_POwnExpense_add_Compliance) {
        this.sum_POwnExpense_add_Compliance = sum_POwnExpense_add_Compliance;
    }

    public String getSettlementDate() {
        return SettlementDate;
    }

    public void setSettlementDate(String SettlementDate) {
        this.SettlementDate = SettlementDate;
    }



    public String getsystemdate() {
        return systemdate;
    }

    public void setsystemdate(String systemdate) {
        this.systemdate = systemdate;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    @Override
    public void readFields(DataInput in) throws IOException {

        this.PersonId = in.readUTF();
        this.MedicalId = in.readUTF();
        this.SOwnExpense = in.readUTF();
        this.sum_OwnExpense = in.readUTF();
        this.money = in.readUTF();
        this.sum_POwnExpense = in.readUTF();
        this.Compliance = in.readUTF();
        this.sum_Compliance = in.readUTF();
        this.sum_OwnExpense_add_sum_Compliance = in.readUTF();
        this.money2 = in.readUTF();
        this.sum_POwnExpense_add_Compliance = in.readUTF();
        this.SettlementDate = in.readUTF();
        this.systemdate = in.readUTF();
        this.flag = in.readUTF();
    }

    @Override
    public void write(DataOutput out) throws IOException {
        out.writeUTF(PersonId);
        out.writeUTF(MedicalId);
        out.writeUTF(SOwnExpense);
        out.writeUTF(sum_OwnExpense);
        out.writeUTF(money);
        out.writeUTF(sum_POwnExpense);
        out.writeUTF(Compliance);
        out.writeUTF(sum_Compliance);
        out.writeUTF(sum_OwnExpense_add_sum_Compliance);
        out.writeUTF(money2);
        out.writeUTF(sum_POwnExpense_add_Compliance);
        out.writeUTF(SettlementDate);
        out.writeUTF(systemdate);
        out.writeUTF(flag);
    }

    @Override
    public String toString() {
        return PersonId + "|" + MedicalId + "|" + SOwnExpense + "|" + sum_OwnExpense + "|"
                + money + "|" + sum_POwnExpense + "|" + Compliance + "|" + sum_Compliance + "|" + sum_OwnExpense_add_sum_Compliance +
                "|" + money2 + "|" + sum_POwnExpense_add_Compliance + "|" + SettlementDate+ "|" + systemdate;
    }


}